import configparser
import os

# print(os.path.dirname(__file__))
# --------- 文件路径 ---------
BASE_DIR = os.path.dirname(os.path.dirname(__file__))

Test_data=os.path.join(BASE_DIR,'data')

# --------- 测试用例目录文件夹 ---------
TEST_CASE_DIR = os.path.join(BASE_DIR, "TestCase")

# --------- 日志文件夹 ---------
LOG_DIR = os.path.join(BASE_DIR, "log")
Fail_Picture=os.path.join(LOG_DIR,"fail_picture")
# --------- 公共文件夹 ---------

# --------- 测试报告文件夹 ---------
REPORT = os.path.join(BASE_DIR, "report")
ALLURE_DATA = os.path.join(REPORT, "allure_data")
ALLURE_REPORT = os.path.join(BASE_DIR, "allure_report")

# --------- 临时文件夹 ---------/Users/liaogan/huawang-api
TMP_DIR = os.path.join(LOG_DIR, "tmp")

# --------- 图片文件夹 ---------
FAIL_IMAGE_DIR = os.path.join(LOG_DIR, "image_fail")  # 失败截图
HOME_IMAGE_DIR = os.path.join(LOG_DIR, "image_home")  # 会员头像存放目录
ALLURE_IMG_DIR = os.path.join(LOG_DIR, "image_allure")  # allure报告截图目录
IMG_DIR = os.path.join(TMP_DIR, "img")  # 临时图片目录
GIF_FILE_DIR = os.path.join(TMP_DIR, "gif")  # 临时gif目录
VIDEO_DIR = os.path.join(TMP_DIR, "video")  # 临时录屏目录

# --------- 环境配置 ---------

# --------- 测试数据 ---------

# --------- 邮件发送数据 ---------
EMAIL_FROMADDR = ''
EMAIL_PASSWORD = ''
EMAIL_USER = ''
EMAIL_TOADDR = ''
FILE_LIST = ''

config = configparser.ConfigParser()
config.read(BASE_DIR + '/config_yg.ini', encoding='utf-8')

# --------- 后台账号 ---------
JH_USERNAME = config['host']['user']
JH_PASSWORD = config['host']['password']

# --------- 测试环境数据库账号 ---------
db_config = {
    'host': '166.166.200.51',  # 主机
    'user': 'root',  # 用户名
    'password': 'Guijiu@2022',  # 密码
    'port': 3306,  # 端口 3306
    'database': 'db-jinhua'  # 数据库名
}

# 管理台url
yg_url = 'https://hwyg.jinhua-global.com'
yg_test_url = 'https://hwygtest.jinhua-global.com'
yc_url = 'https://hwyc.huawangglobal.com'
yc_test_url = 'https://hwyctest.huawangglobal.com'
yk_url = 'https://jky.huawangglobal.com/'
yk_test_url = ''


"""花王华云客小程序userToken"""
userToken = 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1aWQiOjgxMzA5MCwidU5hbWUiOiIxNTIxODcwMTg5NyIsInNjb3BlIjo4LCJleHAiOjE3NzQ0MjgyOTgsImlhdCI6MTY4ODAyODI5OH0.q_BrmIXoqtOPeCoYBAgnyTf0vXCecrkGju1KFNtIH0o'

if __name__ == '__main__':
    print(yg_url)
    print(Test_data)
    print(BASE_DIR)
    print(TEST_CASE_DIR)
